package org.mcflier.appuntamento.io.driver.db.interfaces;

import java.util.List;

import org.mcflier.appuntamento.data.model.Genre;
import org.mcflier.appuntamento.io.exception.JDBCConnectionException;
import org.mcflier.appuntamento.io.exception.JDBCStatementException;
import org.mcflier.appuntamento.io.exception.JDBCTransactionException;

public interface IJDBCGenreDriver {

	public boolean addGenre(Genre genre, boolean useTransaction) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException;
	
	public int addGenres(List<Genre> genres) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException; 
	
	public boolean existsGenre(int id) throws JDBCStatementException, JDBCConnectionException;
	
	//Return a list with the stored genres' id
	public List<Integer> existGenres(List<Integer> ids) throws JDBCStatementException, JDBCConnectionException;
	
	public Genre getGenre(int id) throws JDBCStatementException, JDBCConnectionException;
	
	public List<Genre> getMovieGenres(String idMovie) throws JDBCConnectionException, JDBCStatementException;
	
	public boolean deleteGenre(int id, boolean useTransaction) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException;
}
